﻿#light

namespace Twitter.Model

type ITwitterStore =
    // statuses
    abstract GetStatus : id:int64 -> Status
    abstract SetStatus : text:string * ?replyToStatus:int64 -> Status
    abstract DeleteStatus : int64 -> unit
    
    // users
    abstract GetUser : name:string -> User
    abstract SetUser : ?name:string * ?email:string * ?url:string * ?location:string * ?description:string -> unit
    abstract GetFriends : ?name:string * ?page:int -> list<User>
    abstract GetFollowers :  ?name:string * ?page:int -> list<User>
    
    // past statuses
    abstract GetArchive : ?name:string * ?fromId:int64 * ?toId:int64 * ?page:int -> list<Status>
    abstract GetTimeline : ?fromId:int64 * ?toId:int64 * ?count:int * ?page:int -> list<Status>
    
    // direct messages
    abstract GetDirectMessages : ?fromId:int64 * ?page:int -> list<DirectMessage>
    abstract GetArchiveDirectMessages : ?fromId:int64 * ?page:int -> List<DirectMessage>
    abstract SetDirectMessage : destination:string * text:string -> DirectMessage
    abstract DeleteDirectMessage : id:int64 -> unit
    
    // friendships
    abstract CreateFriendship : name:string -> unit
    abstract EndFriendship : name:string -> unit
    abstract FriendshipExists : nameA:string * nameB:string -> bool
    
    // favorites
    abstract GetFavorites : ?name:string * ?page:int -> List<Status>
    abstract CreateFavorite : id:int64 -> unit
    abstract DestroyFavorite : id:int64 -> unit
    
    // blocking
    abstract CreateBlock : name:string -> unit
    abstract DestroyBlock : name:string -> unit
    
type ITwitterAuthStore =
    inherit ITwitterStore
    
    abstract TestAuth : unit -> bool